package org.yjc.custom;

import java.util.HashMap;

import org.springframework.data.domain.Page;

public class JqgridUtils {
	public static HashMap<String, Object> getPageResult(Page page) {
		HashMap<String, Object> result=new HashMap<>();
		result.put("total", page.getTotalPages());
		result.put("page", page.getNumber()+1);
		result.put("records", page.getTotalElements());
		result.put("rows", page.getContent());
		return result;
	}
}
